<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*,java.util.*,vo.*,utils.*,impl.*" errorPage="" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>选择产品</title>
<LINK rel="stylesheet" href="/css/arg.css" type="text/css">
<style type="text/css">
		@import "/dojo/dijit/themes/tundra/tundra.css";
		.product {
		    width:15px;
			height:11px;
			background: url('/images/file-1.gif') no-repeat;
		}
	</style>


	<script type="text/javascript" src="/dojo/dojo/dojo.js"
		djConfig="parseOnLoad: true, isDebug: false"></script>

	<script language="JavaScript" type="text/javascript">
		dojo.require("dojo.data.ItemFileReadStore");
		dojo.require("dijit.Tree");
		dojo.require("dojo.parser");	// scan page for widgets and instantiate them
	</script>
<SCRIPT language="javascript" src="/script/tools_1.js"></SCRIPT>
<script>
function check(){
}
</script>
</head>

<body class="tundra" topmargin="0" leftmargin="0">
<form name="form1" method="post" action="" onsubmit="return false;">
<script>
	createTitle("选择产品");
</script>
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="border">
  <tr>    
    <td class="table_content">
	<div dojoType="dojo.data.ItemFileReadStore" jsId="continentStore"
					url="/ProductAction.sn?cmd=getTreeString"></div>
				
				<div dojoType="dijit.Tree" id="mytree" store="continentStore" query="{root:'1'}"
					labelAttr="name" label="根目录">
					<script type="dojo/method" event="onClick" args="item">
						if(item){
//							alert("Execute of node " + continentStore.getLabel(item)
//								+", population=" + continentStore.getValue(item, "id"));
							if(continentStore.getValue(item,"type")=="3"){
								try{
									opener.form1.productName.value=(continentStore.getValue(item,"name"));
									opener.form1.productId.value=(continentStore.getValue(item,"id")).substring(2);
								}catch(e){}
								window.close();
							}
						}else{
							//alert("Execute on root node");
						}
					</script>
					<script type="dojo/method" event="getIconClass" args="item">
						if(continentStore.getValue(item,"type")=="3")						
							return "product";
						else
							return "category";
					</script>
				</div>
    </td>
</table>
</form>
</body>
</html>
